﻿/**************************************************************
 * St. Sana - A file/folder scanner originall designed for    *
 * Open Media Library (open-media-library.googlecode.com)     *
 *                                                            *
 * Available for use by ANY project that wants to use it.     *
 * St. Sana is covered by the Apache 2 license.               *
 * Feel free to use this software however you like so as long *
 * as you follow the guidelines of above mentioned license.   *
 * Written by David J. Shultz (djshultz@gmail.com)            *
 **************************************************************/

using System;
using System.IO;
using System.Collections.Generic;

namespace StSana
{
    public class SSFile
    {
        IList<SSFile> siblingFiles;
        IList<SSFile> sisters;
        public IList<int> EpisodeNumbers;

        #region properties
        public string ShowName
        {
            get; set;
        }

        public bool IsAMovie
        {
            get; set;
        }

        public bool IsATVEpisode
        {
            get; set;
        }

        public string Name
        {
            get; set;
        }

        public string FullPath
        {
            get; set;
        }

        public int Level
        {
            get; set;
        }

        public SSFolder ParentFolder
        {
            get; set;
        }

        public bool IsProcessed
        {
            get; set;
        }

        public int SeasonNumber
        {
            get; set;
        }

        #endregion


        public SSFile(SSFile previousFile)
        {
            throw new Exception("Dont copy this object!!!");
        }

        public SSFile(string name, int level)
        {
            EpisodeNumbers = new List<int>();
            siblingFiles = new List<SSFile>();
            sisters = new List<SSFile>();
            FullPath = Path.GetFullPath(name);
            Name = Path.GetFileName(name);
            Level = level;
        }

        public IList<SSFile> SiblingFiles()
        {
            return siblingFiles;
        }

        public void AddSibling(SSFile file)
        {
            siblingFiles.Add(file);
        }

        public void AddSister(SSFile file)
        {
            sisters.Add(file);
        }
    }
}
